package com.ces.knacky.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractChildEntity;

/** @author Hibernate CodeGenerator */
public class CompanyAddress extends AbstractChildEntity implements Serializable {

    /** persistent field */
    private com.ces.knacky.model.Address address;

    /** persistent field */
    private com.ces.knacky.model.Company company;

    /** full constructor */
    public CompanyAddress(com.ces.knacky.model.Flag flag, com.ces.knacky.model.Address address, com.ces.knacky.model.Company company) {
        this.flag = flag;
        this.address = address;
        this.company = company;
    }

    /** default constructor */
    public CompanyAddress() {
    }

    public com.ces.knacky.model.Address getAddress() {
        return this.address;
    }

    public void setAddress(com.ces.knacky.model.Address address) {
        this.address = address;
    }

    public com.ces.knacky.model.Company getCompany() {
        return this.company;
    }

    public void setCompany(com.ces.knacky.model.Company company) {
        this.company = company;
    }
    public boolean equals(Object other) {
        if ( !(other instanceof CompanyAddress) ) return false;
        CompanyAddress castOther = (CompanyAddress) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }
}
